---
layout: example
category: example
title: Display a map with a custom style
description: Using a custom Mapbox-hosted style.
tags:
  - styles
---
<div id='map'></div>
<script>
var map = new mapboxgl.Map({
    container: 'map', // container id
    style: 'mapbox://styles/mapbox/dark-v9', //hosted style id
    center: [-77.38, 39], // starting position
    zoom: 3 // starting zoom
});
</script>
